﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo06
{
    class Program
    {
        //定义一个结构体，名为PersonStruct，有三个成员变量：姓名、电话、地址
        struct PersonStruct {
            public string name;
            public int tel;
            public string address;
    }

        static void Main(string[] args)
        {
            //在主方法中，创建一个PersonStruct结构体对象p1，为p1的成员变量赋值。
            //再声明一个PersonStruct结构体变量p2，把p1赋值给p2，改变p2的姓名，打印p1的内容。
            PersonStruct p1 = new PersonStruct();
            p1.name = "张三";
            p1.tel = 123456;
            p1.address = "北京朝阳";
            Console.WriteLine("我叫:" + p1.name + "电话:" + p1.tel + "地址:" + p1.address);

            PersonStruct p2 = p1;
            p2.name = "李四";
            Console.WriteLine("我叫:"+p1.name+"电话:"+p1.tel+"地址:"+p1.address);

            //在主方法中，创建一个PersonClass对象p3，为p3的成员变量赋值。
            //再声明一个PersonClass变量p4，把p3赋值给p4，改变p4的姓名，打印p3的内容。
            PersonClass p3 = new PersonClass();
            p3.name = "赵云";
            p3.tel = 234567;
            p3.address = "龙岩新罗";
            Console.WriteLine("我叫:" + p3.name + "电话:" + p3.tel + "地址:" + p3.address);

            PersonClass p4 = p3;
            p4.name = "刘备";
            Console.WriteLine("我叫:" + p3.name + "电话:" + p3.tel + "地址:" + p3.address);

           School();

            Ailuoke ai = new Ailuoke("艾洛克", "来自末日边境的勇士", 70, 50, 20);
            ai.Fat();
            ai.Ski();
            Console.WriteLine();

            Taila ta = new Taila("泰拉", "为复仇而来的勇者", 75, 60, 30);
            ta.Fat();
            ta.Ski();
            Console.WriteLine();

            Rukas ru = new Rukas("卢卡斯", "彬彬有礼的剑士", 80, 40, 60);
            ru.Fat();
            ru.Ski();
            Console.WriteLine();

            Luofei lu = new Luofei("洛菲", "擅长传送魔法的时空旅行者", 70, 30, 80);
            lu.Fat();
            lu.Ski();
            Console.WriteLine();



        }


        //定义一个方法在控制台输出这些属性的值。
        public static void School() {
            Student st = new Student();
            st.Id = 10;
            st.Name = "貂蝉";
            st.Sex = '女';
            st.Cardid = "123456789x";
            st.Tel = 123456;
            st.Major = "软件工程";
            st.Grade = "大一";
            Console.WriteLine("学号："+st.Id+"姓名:"+st.Name+"性别:"+st.Sex+ "身份证号："+st.Cardid
                +"电话："+st.Tel+"专业:"+st.Major+"年级:"+st.Grade);


            Teacher tea = new Teacher();
            tea.Id = 2;
            tea.Name = "张飞";
            tea.Sex = '男';
            tea.Title = "软件教师";
            tea.Wageno = 6666;
            Console.WriteLine("编号：" + tea.Id + "姓名:" + tea.Name + "性别:" + tea.Sex + "职务："+tea.Title
                +"工资号:"+tea.Wageno);
        }
    }
}
